<%@ page language="Java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<b>Wyszukaj wycieczkę</b>

 <fieldset style="width:90%; padding:25px 10px 10px 10px;">
    <legend class="formElement" >Kryteria wyszukiwania</legend>
	<form:form action="searchToursResult.html" method="post"
		commandName="tourForm">
		
		<div class="formElement">
			<form:label path="placeIds">Miejsce wycieczki </form:label><br>
			<form:checkboxes path="placeIds" items="${hotels}" itemLabel="cityName" itemValue="cityId" />
		</div>
		
		<div class="formElement" style="display:inline;">
			<form:label path="departureFrom">Wylot od </form:label>
			<form:input path="departureFrom" />
		</div>

		<div class="formElement" style="display:inline;">
			<form:label path="departureTo"> Wylot do </form:label>
			<form:input path="departureTo" />
		</div>

		<div class="formElement">
			<form:label path="personCounter">Liczba osób </form:label>
			<form:select path="personCounter">
				<form:option value="1" />
				<form:option value="2" />
				<form:option value="3" />
				<form:option value="4" />
			</form:select>
		</div>
		<div class="formElement">
			<form:label path="length">Czas pobytu </form:label>
			<form:select path="length">
				<c:forEach var="tmp" items="${tourLengthList}">
					<form:option value="${tmp}">
						<spring:message code="${tmp['label']}" />
					</form:option>
				</c:forEach>
			</form:select>
		</div>
		<div class="formElement">
			<input type="submit" value="Szukaj" />
		</div>
	</form:form>
	
</fieldset>